<!--
 * @Author: lmk
 * @Date: 2021-11-24 15:02:28
 * @LastEditTime: 2021-12-01 16:39:47
 * @LastEditors: lmk
 * @Description: 
-->
<template>
	<view :class="currentTheme">
		<a-nabbar name="组局管理" />
		<mescroll-body  @init="mescrollInit"  @down="downCallback"  @up="upCallback">
			
			<view class=" u-padding-left-32 u-padding-right-32 u-padding-top-32">
				<item-search placeholder="搜索发行或剧本" @change="downCallback" v-model="form.name"></item-search>
				<view  v-for="(item,index) in dataList" :key="index" class="u-margin-top-20">
					<!--  -->
					<list-item :item="item" :isAvatar="false" :createNames="true" :isShare="false" :showTime="false" :showFooterRight="false">
						<view class="u-margin-top-20  u-flex u-row-left" slot="footer-end" >
							<view class="u-flex">
<!--								<u-button hover-class="none" :border="false" -->
<!--								:custom-style="{color:'#765CFE',background:'#765CFE',width:'143rpx',height:'46rpx'}" -->
<!--								shape="circle" @click="createItem(item,'online')">-->
<!--									<text class="text-white u-font-20">线上组局</text>-->
<!--								</u-button>-->
								<!-- <u-button hover-class="none" :border="false"
								:custom-style="{color:'#765CFE',background:'#765CFE',width:'143rpx',height:'46rpx'}" 
								shape="circle" @click="createItem(item)">
									<text class="text-white u-font-20">组局</text>
								</u-button> -->
								<item-btn @click="createItem(item)" height="64" width="200">组局</item-btn>
							</view>
						</view>
					</list-item>
				</view>
			</view>
		</mescroll-body>
	</view>
</template>

<script>
	import upCallback from '@/mixins/upCallbackMixin.js'
	import itemSearch from '@/components/itemSearch/itemSearch.vue'
	export default {
		mixins:[upCallback],
		components: {
			itemSearch
		},
		data() {
			return {	
				apiModule:'shopApi',
				apiType:'systemStoreProduct',
				name:"findPageByCon",
				timer:null,
				form:{
					types: 'script',
					name:''
				}
			}
		},
		onLoad() {
			this.form.storeId = this.loginForm.storeId
		},
		methods: {
			createItem(item,type){
				const isOnline = type=='online';
				const params = {
					id:item.productId,
					label:isOnline ? '线上':'线下',
					storeId:this.loginForm.storeId
				}
				isOnline ? params.onlineIntoPayMoney = item.onlineIntoPayMoney : params.intoPayMoney = item.intoPayMoney
				this.$u.route({
					url:'/pagesA/storeLarpManager/addLarp',
					params
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
	.addlarp-btn-box{
		padding: 0 283rpx;
	}
	.page-title{
		&::after{
			content: '';
			display: block;
			height: 4rpx;
			width: 320rpx;
			margin: 27rpx auto;
			background-color: $primary;
      
		}
	}
</style>
